﻿@{
    Layout = null;
    var user = ViewData["user"] as Pay.DTO.token_user_info;
    var ad = ViewData["ad"] as Pay.DTO.ad_dto;
    string site_img = ViewData["site_img"] as string;


}
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>我的</title>
    <meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0,maximum-scale=1.0, user-scalable=no" />
    <link rel="stylesheet" href="~/Content/css/base.css" />
    <link rel="stylesheet" href="~/Content/css/tuoken.css" />
    <script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
    <script type="text/javascript" src="~/Content/js/base.js"></script>
    <script src="~/Content/js/layer/1.9.3/layer.js"></script>
</head>

<body>
    <div class="bodyct">
        <div class="accountpd">
            <div class="account">
                <div class="set"><a href="/home/set">设置</a></div>
                @if (user == null || user.mobile == "") {
                    <img src="~/Content/images/my/icon.png" alt="">
                    <a href="/Home/Login" class="atlogin">立即登陆</a>} else if (user.photo == "") {
                    <img src="~/Content/images/my/icon.png" alt="">
                } else {

                    <img src="@(string.IsNullOrEmpty(user.photo)?"/Content/images/my/icon.png":string.Format("{0}{1}",site_img,user.photo))" alt="">
                }
            </div>
            @*<a href="/User/MyAsset" class="account_link">
                    <i class="monery"></i> 我的资产
                </a>*@

            <a href="/User/UserInfo" class="account_link">
                <i class="monery"></i> 账号设置
            </a>
            <a href="/mybill/wallet" class="account_link">
                <i class="account"></i> 拓垦钱包
            </a>
            <a href="/MyOrder/OrderList" class="account_link">
                <i class="order"></i> 我的订单
            </a>
            @if (user != null && user.is_show_shop) {
                <a href="/shopinfo/shopmanage" class="account_link">
                    <i class="mystore"></i> 我的店铺
                </a>}
            <div class="accountbg" style="@(ad != null ? string.Format("background:url('{0}'); background-size:100%", site_img + ad.img_url) : "")"
                 onclick="@((ad != null && !string.IsNullOrEmpty(ad.link_url)) ? string.Format("clickAd('{0}','{1}')", ad.id,ad.link_url) : "")">@(ad != null ? "" : "拓垦大陆")</div>
            </div>
        </div>
        <!--底部-->
    <div class="footer">
        <a href="/Home/Index">
            <i></i>
            <span>基地</span>
        </a>
        <a href="/DistributionMall/Index">
            <i></i>
            <span>云商城</span>
        </a>
        <a href="/ProductTokenMaker/Index">
            <i></i>
            <span>创客导购</span>
        </a>
        @*<a href="/Consumption/Index">
            <i></i>
            <span>发现</span>
        </a>*@

        <a href="/User/My" class="on">
            <i></i>
            <span>我的</span>
        </a>
    </div>
        <script>
        //点击广告，记录点击数
        function clickAd(id, url) {
            $.ajax({
                url: '@Url.Action("GetAd","Ad")',
                async: false,
                type: 'POST',
                data: { id: id },
                success: function (result) {
                    window.location.href = url;
                }
            });
        }
        $('.footer a').click(function () {
            $(this).addClass('on').siblings().removeClass('on');
        });
        </script>
    </body>

</html>